/* ===========================================
 * 标签组件样式
 * =========================================== */

/* --------- 标签视图容器 --------- */
.tags-view-container {

  border-bottom: 1px solid var(--color-border);
  padding: 8px 16px 0;
  position: relative;
  width: 100%;
}

/* --------- 滚动轨道容器 --------- */
.tags-track {
  width: 100%;
  overflow: hidden;
  position: relative;
  
  /* 左右渐变遮罩 */
  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 2;
    pointer-events: none;
  }
  

  

}

/* --------- 滚动容器 --------- */
.tags-container {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 20px;
  align-items: center;
  min-height: 40px;

  &::-webkit-scrollbar {
    display: none;
  }
}

/* --------- 现代化标签样式 --------- */
.n-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  height: 28px;
  margin-right: 4px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  white-space: nowrap;
  
  /* 内部高光效果 */
  &::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 50%;
    border-radius: 13px 13px 6px 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0.5;
    transition: opacity 0.22s ease;
  }
  
  /* 底部细微阴影 */
  &::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 2px;
    right: 2px;
    height: 1px;
    background: var(--color-border);
    border-radius: 14px;
    opacity: 0.6;
    transition: opacity 0.22s ease;
  }

  /* --------- 悬停效果 --------- */
  &:hover:not([type='primary']) {
    color: var(--color-primary) !important;
    border-color: var(--color-primary);
    scale: 1.03;
    
    &::before {
      opacity: 0.8;
    }
    
    &::after {
      opacity: 0;
    }

    /* 图标颜色同步 */
    i {
      color: var(--color-primary) !important;
    }

    /* 关闭按钮样式 */
    :deep(.n-tag__close) {
      color: var(--color-primary) !important;
      
      &:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444 !important;
        scale: 1.1;
      }
    }
  }

  /* --------- 激活状态 - 蓝色透明背景 --------- */
  &[type='primary'] {
    background: rgba(32, 128, 240, 0.08) !important;
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    font-weight: 600;
    scale: 1.03;
    z-index: 1;
    
    &::before {
      opacity: 0.6;
    }
    
    &::after {
      opacity: 0;
    }

    /* 强制覆盖文字颜色 */
    :deep(.n-tag__content),
    :deep(*:not(.n-tag__close)) {
      color: var(--color-primary) !important;
    }

    /* 激活状态悬停 */
    &:hover {
      background: rgba(32, 128, 240, 0.12) !important;
      scale: 1.04;
    }

    /* 激活状态关闭按钮 */
    :deep(.n-tag__close) {
      color: var(--color-primary) !important;
      
      &:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444 !important;
        scale: 1.1;
      }
    }
  }
}

/* --------- 图标优化 --------- */
.n-icon {
  margin-right: 4px;
  vertical-align: middle;
  font-size: 12px;
  transition: color 0.22s ease;
}

/* --------- 响应式设计 --------- */
@media (max-width: 768px) {
  .tags-view-container {
    padding: 6px 12px 0;
  }
  
  .n-tag {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    margin-right: 3px;
    border-radius: 13px;
  }
  
  .tags-container {
    padding: 0 12px;
    min-height: 36px;
  }
  
  .tags-track {
    &::before,
    &::after {
      width: 16px;
    }
  }
}